<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<jsp:include page="../parts/adminFooter.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>菜单管理的新增或编辑页面</title>
</head>
<body>
	
	<form id="menuForm">
		<table class="table">
			<c:if test="${m.id != null}">
				<input type="hidden" name="id" value="${m.id}"/>
			</c:if>
			<tr>
				<td width="100px" align="right" >菜单名称：</td>
				<td>
					
					<input value="${m.text }" 
					 class="easyui-textbox" name="text" value=""
					data-options="
						width:200,
						height:30,
						required:true,
						validType:'chs'
					">
				</td>
			</tr>
			<tr>
				<td width="100px" align="right">父菜单名称：</td>
				<td>
					<input type="hidden" id="p1" value="${m.parentId }"/>
					<select id="cc1" class="easyui-combotree" name="parentId" 
        			data-options="
        			url:'${ctx }/menu/find',
        			parentField:'parentId',
        			width:200,
        			height:30,
        			onLoadSuccess:function(node,data){
        				$('#cc1').combotree('setValue',$('#p1').val());
        			}
        			"></select> 
				</td>
			</tr>
			<tr>
				<td width="100px" align="right">链接：</td>
				<td>
					<input value="${m.url }" name="url" class="easyui-textbox" data-options="
						width:200,
						height:30
					">
				</td>
			</tr>
			<tr>
				<td width="100px" align="right">图标：</td>
				<td>
					<input value="${m.icon }" name="icon" class="easyui-textbox" data-options="
						width:200,
						height:30
					">
				</td>
			</tr>
			<tr>
				<td width="100px" align="right">顺序：</td>
				<td>
					<input value="${m.sort==null?1:m.sort }" class="easyui-numberspinner" name="sort" value="" data-options="
						width:200,
						height:30,
						min:1,
						max:100,
						editable:false
					">
				</td>
			</tr>
			<tr>
				<td width="100px" align="right">状态：</td>
				<td>
					<select class="easyui-combobox"
					 name="state" 
					 style="width:200px;height:30;">   
					    <option value="0">可用</option>   
					    <option value="1">不可用</option>   
					</select> 
				</td>
			</tr>
		</table>
	</form>   
</body>
</html>